package code;

import java.util.ArrayList;

public class QuestionNum_06_7 {
    public static void main(String[] args) {
        employees em1 = new employees();
        employees em2 = new employees();
        employees em3 = new employees();

        em1.name="tom";em1.number=0001;em1.salary=6999;
        em2.name="huang";em2.number=0002;em2.salary=6999;
        em3.name="yao";em3.number=0003;em3.salary=6999;


        ArrayList<employees> arra = new ArrayList<employees>();
        arra.add(em1);arra.add(em2);arra.add(em3);

        for (int i=0;i<arra.size();i++){
            System.out.println("姓名是:"+arra.get(i).name+" 工号是:"+arra.get(i).number+" 工资是:"+arra.get(i).salary);
        }
    }
}
